package com.rdd.transformation

import org.apache.spark.{SparkConf, SparkContext}

object testSaveAsFile {
  def main(args: Array[String]): Unit = {

    val conf = new SparkConf().setAppName("testUnion").setMaster("local")
    val sc = new SparkContext(conf)

    val t1 = sc.textFile("src\\main\\scala\\join1.txt")
    val t2 = sc.textFile("src\\main\\scala\\join2.txt")

    val unit = t1.union(t2)

    unit.saveAsTextFile("src\\main\\scala\\result")

    sc.stop()
  }
}
